/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package com.gym.manager.interfaz;

import javax.microedition.lcdui.Command;
import javax.microedition.lcdui.CommandListener;
import javax.microedition.lcdui.Displayable;
import javax.microedition.lcdui.Form;
import javax.microedition.lcdui.StringItem;

/**
 *
 * @author Sergio
 */
class FormaAyuda extends Form implements CommandListener {

    private Command volver;
    private MIDletGymManager principal;

    public FormaAyuda(MIDletGymManager interfaz) {
        super("Help");
        setCommandListener(this);
        principal = interfaz;
        volver = new Command("Return", Command.SCREEN, 0);
        addCommand(volver);
        StringItem texto = new StringItem("Gym manager es una aplicacion que permite registrar el progreso de las actividades fisicas que realiza un", " deportista.");
        append(texto);

    }

    public void commandAction(Command cmnd, Displayable dsplbl) {
        if (cmnd == volver) {
            principal.mostrarFormaPrincipal(null);
        }
    }
}
